package cn.stylefeng.guns.orderitem.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.order.entity.Order;
import cn.stylefeng.guns.orderitem.dto.OrderItemDTO;
import cn.stylefeng.guns.orderitem.entity.OrderItem;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * order_item 服务类
 *
 * @author aria
 * @date 2021/02/20 20:24
 */
public interface OrderItemService extends IService<OrderItem> {

    /**
     * 分页查询order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    PageResult<OrderItem> page(OrderItemDTO orderItemDTO);

    /**
     * 查询所有order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    List<OrderItem> list(OrderItemDTO orderItemDTO);

    /**
     * 添加order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    void add(OrderItemDTO orderItemDTO);

    /**
     * 删除order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    void delete(OrderItemDTO orderItemDTO);

    /**
     * 编辑order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    void edit(OrderItemDTO orderItemDTO);

    /**
     * 查看详情order_item
     *
     * @author aria
     * @date 2021/02/20 20:24
     */
    OrderItem detail(OrderItemDTO orderItemDTO);


    /**
     * 根据orderId获取订单项集合
     * @param order
     * @return
     */
    List<OrderItem> getItemsByOrderId(Order order);

}